home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- openDirutil()
- if xfactoryList("Fileio") = EMPTY then
- openXLib("FileIO")
- end if
- end
-
- on stopMovie
- if xfactoryList("Fileio") <> EMPTY then
- closeXLib("FileIO")
- end if
- closeDirUtil()
- end
-
- on openDirutil
- global x
- openXLib("DirUtil")
- set x to DirUtil(mnew)
- end
-
- on closeDirUtil
- global x
- x(mdispose)
- closeXLib("DirUtil")
- end
-
- on QTVersion
- global x
- put x(mQTVersion) into field "QTVersion"
- end
-
- on qtversionstring
- global x
- put x(mQTVersionStr) into field "QTVersionString"
- end
-
- on setattrib aFilename
- global x
- if voidp(aFilename) then
- set f to FileIO(mnew, "?read", "*")
- if objectp(f) then
- set aFilename to f(mFileName)
- f(mdispose)
- end if
- end if
- if not voidp(aFilename) then
- x(mSetAttrib, aFilename, 0)
- end if
- end
-
- on getattrib aFilename
- global x
- if voidp(aFilename) then
- set f to FileIO(mnew, "?read", "*")
- if objectp(f) then
- set aFilename to f(mFileName)
- f(mdispose)
- end if
- end if
- if not voidp(aFilename) then
- set at to x(mGetAttrib, aFilename)
- else
- set at to "No Filename"
- end if
- put at into field "Attribute"
- end
-
- on getdrivetype adrivenum
- global x, drives
- set drives to ["DRIVE_UNDETERMINED", "DRIVE_NOTEXIST", "DRIVE_REMOVABLE", "DRIVE_FIXED", "DRIVE_REMOTE"]
- if voidp(adrivenum) then
- set adrivenum to value(field "DriveNum")
- end if
- set drtypeno to x(mGetDriveType, adrivenum)
- set drtype to getAt(drives, drtypeno + 1)
- put drtype into field "DriveType"
- end
-
- on WhereISCDRom
- global x
- set hit to 0
- set count to 0
- repeat while (hit = 0) or (count < 50)
- if x(mIsCdrom, count) then
- set hit to 1
- set driveLetter to numToChar(count + 65)
- end if
- set count to count + 1
- end repeat
- if hit = 0 then
- set driveLetter to "No CDROM Found"
- end if
- put driveLetter & ":" into field "CD-ROM"
- end
-
- on authors
- global x
- put x(mAuthors) into field "Author Info"
- end
-
- on seterroron
- global x
- x(mSetErrorMode, 1)
- end
-
- on seterroroff
- global x
- x(mSetErrorMode, 0)
- end
-
- on testerrors
- WhereISCDRom()
- set cdpath to field "CD-ROM"
- put cdpath
- set errortest to FileIO(mnew, "read", cdpath & "\Garbage.txt")
- if objectp(errortest) then
- alert("IT's found")
- errortest(mdispose)
- else
- alert("It's not found")
- end if
- end
-